#include <cstdio>
#include <cstring>
struct nod
{
    char name[11];
    char passwd[11];
} tmp;
int main()
{
    int count = 0; //记录总共有多少被修正过密码
    nod mod[1000];
    int num;
    scanf("%d", &num);
    int h, i;
    int passlen;
    char temp[11]; //用于判断密码是否被修正过
    for (h = 0; h < num; ++h)
    {
        scanf("%s %s", tmp.name, tmp.passwd);
        passlen = strlen(tmp.passwd);
        strcpy(temp, tmp.passwd);
        for (i = 0; i < passlen; ++i)
        {
            if ('1' == tmp.passwd[i])
                tmp.passwd[i] = '@';
            else if ('0' == tmp.passwd[i])
                tmp.passwd[i] = '%';
            else if ('l' == tmp.passwd[i])
                tmp.passwd[i] = 'L';
            else if ('O' == tmp.passwd[i])
                tmp.passwd[i] = 'o';
        }
        if (strcmp(temp, tmp.passwd) != 0)
        { //被修改过，记录其信息，同时计数
            mod[count++] = tmp;
        }
    }
    if (0 == count)
    {
        if (num > 1)
            printf("There are %d accounts and no account is modified\n", num);
        else
            printf("There are %d account and no account is modified\n", num);
    }
    else
    {
        printf("%d\n", count);
        for (h = 0; h < count; ++h)
        {
            printf("%s %s\n", mod[h].name, mod[h].passwd);
        }
    }
    return 0;
}